package com.carleasoft.mps.cms.business.train.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.carleasoft.mps.cms.business.process.bean.po.MyApprovalPageCarPo;
import com.carleasoft.mps.cms.business.train.bean.entity.TrainCar;
import com.carleasoft.mps.cms.business.train.bean.entity.TrainConsume;
import com.carleasoft.mps.cms.business.train.bean.entity.TrainConsumeItem;
import com.carleasoft.mps.cms.business.train.bean.entity.TrainDuty;
import com.carleasoft.mps.cms.business.train.bean.po.*;
import com.carleasoft.mps.cms.business.train.bean.vo.*;
import com.carleasoft.mps.core.result.R;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 训练用车 服务类
 * </p>
 *
 * @author fan
 * @since 2023-05-17
 */
public interface TrainCarService extends IService<TrainCar> {
/**************************用车*******************************/
    /**
     * 训练日常消耗-用车-增加
     */
    String add(TrainCarAddOrEditPo trainCarAddOrEditPo);
    /**
     * 训练日常消耗-用车-编辑
     */
    boolean edit(TrainCarAddOrEditPo trainCarAddOrEditPo);
    /**
     * 训练日常消耗-用车-根据编码改状态
     */
    boolean editStatus(TrainCarAddOrEditPo trainCarAddOrEditPo);
    /**
     * 训练日常消耗-用车-删除
     */
    boolean delete(TrainCar trainCar);
    /**
     * 训练日常消耗-用车-分页查询
     */
    Page<TrainCarVo> pageQuery(TrainCarPageQueryPo trainCarPageQueryPo);
    /**
     * 训练日常消耗-用车-详情
     */
    TrainCarDetailVo detail(TrainCar trainCar);
    /**
     * 训练日常消耗-用车-导入
     */
    boolean trainCarImport(List<TrainCar> trainCarList);

    /**
     * 训练日常消耗-用车-模板下载
     */
    boolean trainCarDownload(HttpServletResponse response);

    /**
     * 训练日常消耗-用车-模板解析
     */
    List<TrainCar> trainCarParse(MultipartFile file);

    /**************************消耗*******************************/
    /**
     * 训练日常消耗-消耗-增加
     */
    boolean consumeAdd(ConsumeAddOrEditPo consumeAddOrEditPo);
    /**
     * 训练日常消耗-消耗-编辑
     */
    boolean consumeEdit(ConsumeAddOrEditPo consumeAddOrEditPo);
    /**
     * 训练日常消耗-消耗-删除
     */
    boolean consumeDelete(TrainConsume trainConsume);
    /**
     * 训练日常消耗-消耗-分页查询
     */
    Page<TrainConsumeVo> consumePageQuery(TrainConsumePageQueryPo trainConsumePageQueryPo);
    /**
     * 训练日常消耗-消耗-详情
     */
    TrainConsumeDetailVo consumeDetail(TrainConsume trainConsume);

    /**
     * 训练日常消耗-消耗-维护-添加
     */
    boolean consumeMaintainAdd(TrainConsumeItemAddOrEdit trainConsumeItemAddOrEdit);
    /**
     * 训练日常消耗-消耗-维护-编辑
     */
    boolean consumeMaintainEdit(TrainConsumeItemAddOrEdit trainConsumeItemAddOrEdit);
    /**
     * 训练日常消耗-消耗-维护-批量编辑
     */
    boolean consumeMaintainBatchEdit(TrainConsumeItemBatchEditPo trainConsumeItemBatchEditPo);
    /**
     * 训练日常消耗-消耗-维护-删除
     */
    boolean consumeMaintainDelete(TrainConsumeItem trainConsumeItem);
    /**
     * 训练日常消耗-消耗-维护-分页
     */
    Page<TrainConsumeItemVo> consumeMaintainPageQuery(TrainConsumeItemPageQueryPo trainConsume);
    /**
     * 训练日常消耗-消耗-维护-列表(不用传分页的参数)
     */
    List<TrainConsumeItemVo> consumeMaintainList(TrainConsumeItemPageQueryPo trainConsume);
    /**
     * 训练日常消耗-消耗-维护-详情
     */
    TrainConsumeItemDetailVo consumeMaintainDetail(TrainConsumeItem trainConsumeItem);

    /**
     * 训练日常消耗-消耗-维护-导入
     */
    boolean consumeMaintainImport(String examCode,MultipartFile file);

    /**
     * 训练日常消耗-消耗-维护-模板下载
     */
    boolean consumeMaintainDownload(TrainConsume trainConsume,HttpServletResponse response);
    /**
     * 训练日常消耗-消耗-维护-模板解析
     */
    List<TrainConsumeItem> consumeMaintainParse(MultipartFile file);
    /**
     * 训练日常消耗-消耗-维护-完成
     */
    boolean consumeMaintainFinish(TrainConsume trainConsume);
    /**
     * 训练日常消耗-消耗-下载(维护的药品信息)
     */
    boolean downloadExcelFile(TrainConsume trainConsume, HttpServletResponse response);

    /**************************执勤*******************************/

    /**
     * 训练日常消耗-执勤-增加
     */
    boolean trainDutyAdd(TrainDutyAddOrEditPo trainDutyAddOrEditPo);
    /**
     * 训练日常消耗-执勤-编辑
     */
    boolean trainDutyEdit(TrainDutyAddOrEditPo trainDutyAddOrEditPo);
    /**
     * 训练日常消耗-执勤-删除
     */
    boolean trainDutyDelete(TrainDuty trainDuty);
    /**
     * 训练日常消耗-执勤-分页查询
     */
    Page<TrainDutyVo> trainDutyPageQuery(TrainDutyPageQueryPo trainDutyPageQueryPo);
    /**
     * 训练日常消耗-执勤-详情
     */
    TrainDutyDetailVo trainDutyDetail(TrainDuty trainDuty);
    /**
     * 训练日常消耗-执勤-导入
     */
    boolean trainDutyImport(MultipartFile file);
    /**
     * 训练日常消耗-执勤-模板下载
     */
    boolean trainDutyDownload(HttpServletResponse response);
    /**
     * 训练日常消耗-执勤-模板解析
     */
    List<TrainDuty> trainDutyParse(MultipartFile file);
    /**
     * 办公统计-报车用车
     */
    TrainCarStatisticsVo trainCarStatistics();
    /**
     * 网上办事-报车用车
     */
    HashMap<String,Object> useStatistics(UseStatisticsPo useStatisticsPo);
    /**
     * 网上办事-报车用车-年度用车分类统计
     */
    HashMap<String,Object> carOfYearStatistics();
    /**
     * 统计分析-消耗情况-单位查询
     */
    List<HashMap<String,Object>> statisticalAnalysisDept();

    /**
     * 统计分析-消耗情况
     */
    HashMap<String,Object> statisticalAnalysisConsumption(StatisticalAnalysisConsumptionPo statisticalAnalysisConsumptionPo);

    List<CarExcelVo> contentImportExcel(MultipartFile file);

    List<ConsumeListVo> consumeList(ConsumeListPo consumeListPo);

    boolean importCar(MyApprovalPageCarPo myApprovalPageCarPo,HttpServletResponse response);

    Workbook importCarCount(HttpServletResponse response, String startTime) throws ParseException;
}
